import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },

    {
      path: '/home',
      name: 'home',
      component: HomeView,
      children: [
        {
          path: '/Useroperation',
          name: 'Useroperation',
          component: () => import('../views/SystemManagement.vue/Useroperation.vue'),
        },
        {
          path: '/DefectItem',
          name: 'DefectItem',
          component: () => import('../views/BasicData.vue/DefectItemView.vue'),
        },
        {
          path: '/WorkProcess',
          name: 'WorkProcess',
          component: () => import('../views/BasicData.vue/WorkProcessView.vue'),
        },
        {
          path: '/ProcessRoute',
          name: 'ProcessRoute',
          component: () => import('../views/BasicData.vue/ProcessRouteView.vue'),
        },
        {
          path: '/Product',
          name: 'Product',
          component: () => import('../views/BasicData.vue/ProductView.vue'),
        },
        {
          path: '/BillOfMaterial',
          name: 'BillOfMaterial',
          component: () => import('../views/BasicData.vue/BillOfMaterialView.vue'),
        },
        {
          path: '/InventoryTransaction',
          name: 'InventoryTransaction',
          component: () => import('../views/InventoryManagement/InventoryTransactionView.vue'),
        },



        {
          path: '/NewProductionPlan',
          name: 'NewProductionPlan',
          component: () => import('../views/Order1/ProductionPlanView.vue'),
        },
        {
          path: '/ProductionPlanAdd',
          name: 'ProductionPlanAdd',
          component: () => import('../views/Order1/ProductionPlanAddView.vue'),
        },
        {
          path: '/Weather',
          name: 'Weather',
          component: () => import('../views/Order1/WeatherView.vue'),
        },









        {
          path: '/SalesOrder',
          name: 'SalesOrder',
          component: () => import('../views/ProductionManagement/SalesOrder.vue'),
        },
        {
          path: '/ProductionPlan',
          name: 'ProductionPlan',
          component: () => import('../views/ProductionManagement/ProductionPlan.vue'),
        },
        {
          path: '/AssemblyWorkOrder',
          name: 'AssemblyWorkOrder',
          component: () => import('../views/ProductionManagement/AssemblyWorkOrder.vue'),
        },
        {
          path: '/WorkOrder',
          name: 'WorkOrder',
          component: () => import('../views/ProductionManagement/WorkOrder.vue'),
        },
        {
          path: '/Task',
          name: 'Task',
          component: () => import('../views/ProductionManagement/Task.vue'),
        },
        {
          path: '/WorkReporting',
          name: 'WorkReporting',
          component: () => import('../views/ProductionManagement/WorkReporting.vue'),
        },



        {
          path: '/defective-item-distribution',
          name: 'DefectiveItemDistribution',
          component: () => import('../views/Reportmanagement/DefectiveItemDistribution.vue'),
        },
        {
          path: '/defect-item-summary',
          name: 'DefectItemSummary',
          component: () => import('../views/Reportmanagement/DefectItemSummary.vue'),
        },
        {
          path: '/production-report',
          name: 'ProductionReport',
          component: () => import('../views/Reportmanagement/ProductionReport.vue'),
        },
        {
          path: '/output-statistics',
          name: 'OutputStatistics',
          component: () => import('../views/Reportmanagement/OutputStatistics.vue'),
        },
        {
          path: '/defective-item-distribution',
          name: 'DefectiveItemDistribution',
          component: () => import('../views/Reportmanagement/DefectiveItemDistribution.vue'),
        },
        {
          path: '/defect-item-summary',
          name: 'DefectItemSummary',
          component: () => import('../views/Reportmanagement/DefectItemSummary.vue'),
        },
        {
          path: '/production-report',
          name: 'ProductionReport',
          component: () => import('../views/Reportmanagement/ProductionReport.vue'),
        },
        {
          path: '/output-statistics',
          name: 'OutputStatistics',
          component: () => import('../views/Reportmanagement/OutputStatistics.vue'),
        },
        {
          path: '/report-management',
          name: 'ReportManagement',
          component: () => import('../views/Reportmanagement/index.vue'),
        },
        {
          path: '/warehouse-receipt',
          name: 'WarehouseReceipt',
          component: () => import('../views/InventoryManagement/WarehouseReceipt.vue'),
        },
        {
          path: '/outbound-order',
          name: 'OutboundOrder',
          component: () => import('../views/InventoryManagement/OutboundOrder.vue'),
        },
        {
          path: '/outbound-order-test',
          name: 'OutboundOrderTest',
          component: () => import('../views/InventoryManagement/OutboundOrderTest.vue'),
        },
        {
          path: '/outbound-product-detail-test',
          name: 'OutboundProductDetailTest',
          component: () => import('../views/InventoryManagement/OutboundProductDetailTest.vue'),
        },
        {
          path: '/simple-outbound-test',
          name: 'SimpleOutboundTest',
          component: () => import('../views/InventoryManagement/SimpleOutboundTest.vue'),
        },
        {
          path: '/quick-test',
          name: 'QuickTest',
          component: () => import('../views/InventoryManagement/QuickTest.vue'),
        },
        {
          path: '/approval-test',
          name: 'ApprovalTest',
          component: () => import('../views/InventoryManagement/ApprovalTest.vue'),
        },
        {
          path: '/approval-diagnosis',
          name: 'ApprovalDiagnosis',
          component: () => import('../views/InventoryManagement/ApprovalDiagnosis.vue'),
        },
        {
          path: '/image-test',
          name: 'ImageTest',
          component: () => import('../views/InventoryManagement/ImageTest.vue'),
        },
        {
          path: '/image-upload-test',
          name: 'ImageUploadTest',
          component: () => import('../views/InventoryManagement/ImageUploadTest.vue'),
        },
        {
          path: '/image-path-test',
          name: 'ImagePathTest',
          component: () => import('../views/InventoryManagement/ImagePathTest.vue'),
        },
        {
          path: '/upload-test',
          name: 'UploadTest',
          component: () => import('../views/InventoryManagement/UploadTest.vue'),
        },
        {
          path: '/edit-upload-test',
          name: 'EditUploadTest',
          component: () => import('../views/InventoryManagement/EditUploadTest.vue'),
        },
        {
          path: '/image-display-test',
          name: 'ImageDisplayTest',
          component: () => import('../views/InventoryManagement/ImageDisplayTest.vue'),
        },




        {
          path: '/SystemLog',
          name: 'SystemLog',
          component: () => import('../views/SystemManagement.vue/SystemLog.vue'),
        },


        {
          path: '/Team_management',
          name: 'Team_management',
          component: () => import('../views/SystemManagement.vue/Team_management.vue'),
        },

        {
          path: '/Kanban_Management',
          name: 'Kanban_Management',
          component: () => import('../views/SystemManagement.vue/Kanban_Management.vue'),
        },
        {
          path: '/Inventory_balance',
          name: 'Inventory_balance',
          component: () => import('../views/SystemManagement.vue/Inventory_balance.vue'),
        },
        {
          path: '/Completion_Order',
          name: 'Completion_Order',
          component: () => import('../views/SystemManagement.vue/Completion_Order.vue'),
        },
        {
          path: '/WarehouseReceipt',
          name: 'WarehouseReceipt',
          component: () => import('../views/InventoryManagement/WarehouseReceipt.vue'),
        },
        {
          path: '/OutboundOrder',
          name: 'OutboundOrder',
          component: () => import('../views/InventoryManagement/OutboundOrder.vue'),
        },


        {
          path: '/Role_Management',
          name: 'Role_Management',
          component: () => import('../views/SystemManagement.vue/Role_Management.vue'),
        },


        {
          path: '/Permission_management',
          name: 'Permission_management',
          component: () => import('../views/SystemManagement.vue/Permission_management.vue'),
        },














      ]
    },

    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },


    {
      path: '/Work_order_progress',
      name: 'abWork_order_progressout',
      component: () => import('../views/SystemManagement.vue/Work_order_progress.vue'),
    },
    {
      path: '/Workshop_production',
      name: 'Workshop_production',
      component: () => import('../views/SystemManagement.vue/Workshop_production.vue'),
    },


  ],
})

export default router
